<!DOCTYPE html>
<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org">
  
  <head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.1</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" data-th-href="@{/css/font.css}">
    <link rel="stylesheet" data-th-href="@{/css/xadmin.css}">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" data-th-src="@{/lib/layui/layui.js}" charset="utf-8"></script>
    <script type="text/javascript" data-th-src="@{/js/xadmin.js}"></script>
    <script type="text/javascript" data-th-src="@{/js/cookie.js}"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
    	.layui-table td,.layui-table th{
        	text-align: center;
        }
        .layui-form-checkbox{
        	margin: -1px 10px 0 0;
        }
    </style>
  </head>
  
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a>
          <cite>导航元素</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
          <input class="layui-input" placeholder="开始日" name="start" id="start">
          <input class="layui-input" placeholder="截止日" name="end" id="end">
          <input type="checkbox" name="like[write]" title="写作">
	      <input type="checkbox" name="like[read]" title="阅读" checked>
	      <input type="checkbox" name="like[dai]" title="发呆">
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
      </div>
      <table class="layui-table" lay-skin="line">
        <thead>
          <tr>
            <th>ID</th>
            <th>用户名</th>
            <th>性别</th>
            <th>打卡时间</th>
            <th>下班时间</th>
            <th>迟到(是/否)</th>
            <th>早退(是/否)</th>
            <th>请假(是/否)</th>
        </thead>
         <tbody>
                <tr data-th-each="attendance : ${pageInfo.list}" data-th-object="${attendance}">
                    <td data-th-text="*{account.id}"></td>
                    <td data-th-text="*{account.account}"></td>
                    <td >
                    	<span data-th-if="*{user.sex==0}">男</span>
                    	<span data-th-if="*{user.sex==1}">女</span>
                    </td>
                    <td data-th-text="*{#dates.format(loginTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td data-th-text="*{#dates.format(logoutTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td>
                    	<span data-th-if="*{!late}">否</span>
                    	<span data-th-if="*{late}">是</span>
                    </td>
                    <td >
                    	<span data-th-if="*{!leaveEarly}">否</span>
                    	<span data-th-if="*{leaveEarly}">是</span>
                    </td>
                    <td >
                    	<span data-th-if="*{askLeave}">否</span>
                    	<span data-th-if="*{!askLeave}">是</span>
                    </td>
                </tr>
            </tbody>
      </table>
       <div data-th-replace="commons/pageInfo :: page(${pageInfo},@{/attendance},'pageNum','pageSize')"></div>
    </div>
    <script>
      layui.use('laydate', function(){
        var laydate = layui.laydate;
        
        //执行一个laydate实例
        laydate.render({
          elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
          elem: '#end' //指定元素
        });
      });
    </script>
  </body>

</html>